﻿import com.mixmedia.control.IList;

/**
 * @author colin
 */
class com.mixmedia.control.ICellRenderer extends MovieClip{
	private var index : Number;
	public var listOwner:IList;
	public var suggested:String;
	public var selected:String;
	public var item;
	private var model:ICellRenderer;
	private var view:ICellRenderer;

	public function ICellRenderer(){
		model.view = this;
	}

	public function visualize(cellRenderer,listOwner,index):MovieClip{
		var cell:ICellRenderer = listOwner.attachMovie(cellRenderer,'cell'+index,1000+index,{model:this,listOwner:listOwner,index:index});
		var view = cell;
		return cell; 
	}
	
	public function getPreferredHeight():Number{return null;};
	public function getPreferredWidth():Number{return null;};
	public function setSize(width:Number,height:Number){};
	public function setValue(suggested,item,selected:String){
		this.suggested = suggested;
		this.item = item;
		this.selected = selected;	
	}
	
	public function getCellIndex():Number{
		return index;
	}

	public function getDataLabel():String{
		return null;
	};
	
	public function redraw():Void{
	
	};
}